package com.example.smartcommunity;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.example.smartcommunity.com.example.utils.SpUtils;

public class GeXingSettingActivity extends AppCompatActivity {

    private ImageView iv_back;
    private TextView tv_next01;
    private TextView tv_next02;
    private TextView tv_next06;
    private TextView tv_name;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_gxsz);


        iv_back = findViewById(R.id.back2);
        tv_next01 = findViewById(R.id.tv_next01);
        tv_next02 = findViewById(R.id.tv_next02);
        tv_next06 = findViewById(R.id.tv_next06);
        tv_name = findViewById(R.id.tv_name);

        String name = (String) SpUtils.getString(getApplicationContext(), "name", "你看起来很好看");

        tv_name.setText(name);


        iv_back.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                finish();
            }
        });
        tv_next01.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(GeXingSettingActivity.this, PersonimageActivity.class);
                startActivity(intent);
            }
        });
        tv_next02.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(GeXingSettingActivity.this,NicknameActivity.class);
                startActivity(intent);
            }
        });
        tv_next06.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(GeXingSettingActivity.this, PersonintroduceActivity.class);
                startActivity(intent);
            }
        });

    }

    @Override
    protected void onStart() {
        super.onStart();
        String name = (String) SpUtils.getString(getApplicationContext(), "name", "你看起来很好看");

        tv_name.setText(name);
    }
}
